package com.rc.pojo.po.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class PlantItemTableDef extends TableDef {

    /**
     * 实体类。

 @author 27806
 @since 2024-07-01
     */
    public static final PlantItemTableDef PLANT_ITEM = new PlantItemTableDef();

    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn ILLS = new QueryColumn(this, "ills");

    public final QueryColumn NAME = new QueryColumn(this, "name");

    public final QueryColumn COVER = new QueryColumn(this, "cover");

    public final QueryColumn AREA_ID = new QueryColumn(this, "area_id");

    public final QueryColumn FARM_ID = new QueryColumn(this, "farm_id");

    public final QueryColumn ADOPTION = new QueryColumn(this, "adoption");

    public final QueryColumn RIPE_NUM = new QueryColumn(this, "ripe_num");

    public final QueryColumn PRODUCTION = new QueryColumn(this, "production");

    public final QueryColumn DESCRIPTION = new QueryColumn(this, "description");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, ILLS, NAME, COVER, AREA_ID, FARM_ID, ADOPTION, RIPE_NUM, PRODUCTION, DESCRIPTION};

    public PlantItemTableDef() {
        super("rc", "plant_item");
    }

    private PlantItemTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public PlantItemTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new PlantItemTableDef("rc", "plant_item", alias));
    }

}
